/**
 * 枚举
 */
const enums ={
	//紧急程度
	troubleLevelList: [{
		text: "低",
		value: "0"
	}, {
		text: "中",
		value: "1"
	}, {
		text: "高",
		value: "2"
	}],
	//设备等级
	deviceLevel: [{
			text: 'A',
			value: '0',
			otherInfo: ""
		},
		{
			text: 'B',
			value: '1',
			otherInfo: ""
		},
		{
			text: 'C',
			value: '2',
			otherInfo: ""
		}, { text: 'Ⅰ类', value: 'Ⅰ', otherInfo: "info" },
		   { text: 'Ⅱ类', value: 'Ⅱ', otherInfo: "info" },
		   { text: 'Ⅲ类', value: 'Ⅲ', otherInfo: "info" },
	],
	
	//设备状态
	EnumDeviceStatus: [{
			text: '正常',
			value: '0',
			otherInfo: ""
		},
		{
			text: '维修中',
			value: '1',
			otherInfo: ""
		},
		{
			text: '报废',
			value: '2',
			otherInfo: ""
		},
	],
	//接单状态
	OrderAcceptanceStatus:[{
			value: 0,
			text: "待接单"
		},
		{
			value: 1,
			text: "已接单"
		},
	],
	//维修工单状态
	RepairStatus: [{
			value: '0',
			text: '待处理'
		},
		{
			value: '1',
			text: '维修中（已接单）'
		},
		{
			value: '2',
			text: '维修完成'
		},
		{
			value: '3',
			text: '已验收'
		},
		{
			value: '4',
			text: '已退回 '
		},
		{
			value: '5',
			text: '已确认'
		},
		{
			value: '6',
			text: '订单已撤回'
		},
		{
			value: '7',
			text: '延期处理'
		},
		{
			value: '8',
			text: '转派'
		},
		{
			value: '9',
			text: '科长已确认'
		},
	],
	//维修订单类型
	EnumRepairOrderType: [{
			text: '维修计划',
			value: '0',
			otherInfo: ""
		},
		{
			text: '设备报修',
			value: '1',
			otherInfo: ""
		},
		{
			text: '设备巡检',
			value: '2',
			otherInfo: ""
		},
		{
			text: '设备点检',
			value: '3',
			otherInfo: ""
		},
		{
			text: '快速维修',
			value: '4',
			otherInfo: ""
		},
	],
	//是否停机状态
	EnumWhetherToShutDown: [{
			value: 0,
			text: "不停机"
		},
		{
			value: 1,
			text: "停机停产"
		},
		{
			value: 2,
			text: "停机不停产"
		},
	],
	//车辆班组
	EnumCarWorkProcedureCode: [{
			text: 'B特箱车辆班',
			value: 'B-TX-CLB',
			otherInfo: ""
		},
		{
			text: 'A车辆',
			value: 'A-CL ',
			otherInfo: ""
		},
		{
			text: 'C冷箱车辆',
			value: "C-CL ",
			otherInfo: ""
		}
	],
	EnumSectionChiefStatus:[{
		text: '未执行',
		value: "0",
		otherInfo: "UN_EXECUTE"
	},{
		text: '执行中',
		value: "1",
		otherInfo: "EXECUTEING"
	},{
		text: '执行完成，班长待确认',
		value: "2",
		otherInfo: "FINISH_EXECUTE"
	},{
		text: '班长确认',
		value: "3",
		otherInfo: "MONITOR_CONFIRM"
	},{
		text: '完成',
		value: "4",
		otherInfo: "MANAGER_CONFIRM"
	}]
} 
export default {
	enums,
	getEnumsName(list, value) {
		if (list && list.length > 0) {
			for (var i = 0; i < list.length; i++) {
				if (list[i].value == value) {
					return list[i].text
				}
			}
			return value + "查无此枚举"
		} else {
			return "枚举列表为空"
		}
	}
}